package com.tedu.lingmaagent.assistant;

import dev.langchain4j.community.model.dashscope.QwenStreamingChatModel;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(wiringMode = AiServiceWiringMode.EXPLICIT,streamingChatModel = "qwenStreamingChatModel",
    chatMemory = "chatMemory",chatMemoryProvider = "chatMemoryProvider",
        tools = "assistantTools"
)
public interface Assistant {

    /*
    * 重载：方法名不同，参数不同*/
//    String chat1(@MemoryId int memoryId,
//              @UserMessage String message);

    @SystemMessage(fromResource = "static/my-prompt-template.txt")
    Flux<String> chat(@MemoryId int memoryId,
              @UserMessage String message);
}